<template>
  <div class="tab-bar">
    <div class="user">
      <img :src="user.avatar" alt="" />
      <div>{{user.nickname}}</div>
    </div>
    <div class="use">
      <div class="cart">
        加入购物车
      </div>
      <div class="buy">
        购买
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "",
  props:{
   user:{
    type:Object,
    default(){
     return {}
    }
   }
  },
  data() {
    return {};
  },
  methods: {}
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.tab-bar {
  height: 60px;
  background-color: #fff;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  z-index: 3;
}
.tab-bar div {
  flex: 1;
}
.user {
 color: #666;
 line-height: 30px;
  display: flex;
  padding: 5px 5px;
}
.user img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}
.use {
 line-height: 60px;
  display: flex;
  border-radius: 15px;
}
.use div {
  text-align: center;
  flex: 1;
}
.cart {
  background-color: orange;
  color: #fff;
}
.buy {
  background-color: orangered;
}
</style>
